package com.excellent.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.excellent.system.mapper.SysTermMapper;
import com.excellent.system.domain.SysTerm;
import com.excellent.system.service.ISysTermService;
import com.excellent.common.core.text.Convert;

/**
 * 学期课题Service业务层处理
 *
 * @author excellent
 * @date 2021-06-18
 */
@Service
public class SysTermServiceImpl implements ISysTermService
{
    @Autowired
    private SysTermMapper sysTermMapper;

    /**
     * 查询学期课题
     *
     * @param termId 学期课题ID
     * @return 学期课题
     */
    @Override
    public SysTerm selectSysTermById(Long termId)
    {
        return sysTermMapper.selectSysTermById(termId);
    }

    /**
     * 查询学期课题列表
     *
     * @param sysTerm 学期课题
     * @return 学期课题
     */
    @Override
    public List<SysTerm> selectSysTermList(SysTerm sysTerm)
    {
        return sysTermMapper.selectSysTermList(sysTerm);
    }

    /**
     * 新增学期课题
     *
     * @param sysTerm 学期课题
     * @return 结果
     */
    @Override
    public int insertSysTerm(SysTerm sysTerm)
    {
        return sysTermMapper.insertSysTerm(sysTerm);
    }

    /**
     * 修改学期课题
     *
     * @param sysTerm 学期课题
     * @return 结果
     */
    @Override
    public int updateSysTerm(SysTerm sysTerm)
    {
        return sysTermMapper.updateSysTerm(sysTerm);
    }

    /**
     * 删除学期课题对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysTermByIds(String ids)
    {
        return sysTermMapper.deleteSysTermByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除学期课题信息
     *
     * @param termId 学期课题ID
     * @return 结果
     */
    @Override
    public int deleteSysTermById(Long termId)
    {
        return sysTermMapper.deleteSysTermById(termId);
    }

}
